GAME_ID_TYPE = {
    'blood': {'name': "血腥牛牛"},
    'longhu': {'name': "龙虎斗"},
    'zjh': {'name': "炸金花"},
    'fish': {'name': "捕鱼"},
    'bull': {'name': "超级牛牛"},
    'honghei': {'name': "红黑大战"},
    'shark': {'name': "金鲨银鲨"},
    'jsys': {'name': '金鲨银鲨'},
    'hero': {'name': "水浒"},
    'ddz': {'name': "斗地主"},
    'bjl': {'name': "百家乐"},
    'ermj': {'name': "二人麻将"},
    'xzmj': {'name': "血战麻将"},
    'qznn': {'name': '抢庄牛牛'},
    'ebg': {'name': '二八杠'},
    'brlh': {'name': '百人龙虎'}
}


EVENT_RULES = {
    "aggs": {
        "groups": [
            {
                "group_name": "游戏ID",
                "field_id": "tax_game_id",
                "is_keyword": True,
                "field_name": "游戏ID",
            },
            {
                "group_name": "渠道",
                "field_id": "_chn",
                "is_keyword": True,
                "field_name": "渠道"
            }
        ],
        "values": [
            {
                "value_id": "tax_tax",
                "value_name": "税收",
                "fmt": "\"%.2f\" % a",
                "adjust_amount": True,
            }
        ],
        "uv": {
            "field_id": "_user_id",
            "field_name": "投注人次"
        },
        "pv": {
            "field_name": "投注次数"
        }
    }
}


EVENT_CONFIG = {
    "event_id": "tax",
    "event_name": "稅收統計",
    "values": {
        "_user_id": {
            "field_name": "用戶ID",
            "value_type": "long",
        },
        "game_id": {
            "field_name": "遊戲ID",
            "value_type": "string",
            "enum": {
                "target_enum_dct": GAME_ID_TYPE
            },
        },
        "project_id": {
            "field_name": "平台號",
            "value_type": "string",
            "required": False
        },
        "tax": {
            "field_name": "稅收金額",
            "value_type": "float",
        }
    },
    "rule": EVENT_RULES
}
